$(function () {
    getCountTag();
    moreRandomArticle();   //随机获取文章信息
})
function getCountTag(){
    getTags = $.ajax("getHotTags","get");
    getTags.done(function (result) {
        <!-- tag -->
        var tagsList = result.extend.tagsList;
        $.each(tagsList,function(index){
            cloneTags = "<li><a href=\"javascript:void(0)\" onclick='getTags1("+index+")'><label>" + this.tagName + "</label><input type=\"hidden\" value=\""+ this.tagId + "\"><span class=\"badge\">" + this.count + "</span></a></li>";
            $("#label").append(cloneTags);
        })
    });
}
function getTags1(index){
    init();
    var tagId = $("#label li").eq(index).find("input").val();
    getArticleByTagsId = $.ajax("getArticleByTagsId?tagId=" + tagId+"&page=" + page,"get");
    getArticleByTagsId.done(function (result) {
        var articleList = result.extend.articleList;
        var cloneArticleSearch = cloneArticle(articleList,"随机显示信息");
        page++;
        $("#articleSearch").append(cloneArticleSearch);
        $("#more").remove();   //移除最后一个随机显示信息
        dianZan();
    })
    return false;
}

